Extensions to the C Language Family

Contents|Index|Previous|Next
Extensions to the C language family

GNU C provides several language features not found in ANSI standard C. (The option, ‘-pedantic’, directs GNU CC to print a warning message if any of these features is used.) To test for the availability of these features in conditional compilation, check for a predefined macro, __GNUC__, which is always defined under GNU CC.

These extensions are available in C and Objective C. Most of the extensions are also available in C++. See Extensions to the C++ language for extensions that apply only to C++.

See the following documentation for more specific discussion regarding extensions to the C language family.

- Statements and declarations in expressions
- Locally declared labels
- Labels as values
- Nested functions
- Constructing function calls
- Naming an expression’s type
- Referring to a type with typeof
- Generalized Lvalues
- Conditionals with omitted operands
- Double-word integers
- Complex numbers
- Arrays of length zero
- Arrays of variable length
- Macros with variable number of arguments
- Non-Lvalue arrays may have subscripts
- Arithmetic on void- and function-pointers
- Non-constant initializers
- Constructor expressions
- Labeled elements in initializers

- Case ranges
- Cast to a union yype

- Declaring attributes of functions
- Prototypes and old-style function definitions
- Compiling functions for interrupt calls

- C++ style comments
- Dollar signs in identifier names
- The ESC character in constants

- Inquiring on alignment of types or variables

- Specifying attributes of variables
- Specifying attributes of types

- An inline function is as fast as a macro
- Assembler instructions with C expression operands
- Constraints for asm operands

- Simple constraints
- Multiple alternative constraints
- Constraint modifier characters
- Constraints for particular machines

- Controlling names used in assembler code
- Variables in specified registers

- Defining global register variables
- Specifying registers for local variables

- Alternate keywords
- Incomplete enum types
- Function namers as strings

- Getting the return or frame address of a function

Top|Contents|Index|Previous|Next